﻿package com.nana.petadventure.app
{
	import com.nana.framework.MVC.view.AppContainer;
	import com.nana.framework.ui.PSprite;
	
	import flash.display.Sprite;
	import flash.display.Stage;
	
	public class AppView extends AppContainer
	{
		private static var _instance:AppView;
		public var playerLayer:PSprite;
		public var tabLayer:PSprite;
		
		public function AppView()
		{
			if(_instance == null) {
				super();
				_instance = this;
				
			} else {
				throw new Error("实例化单例类出错-AppView");
			}
			
		}
		
		public static function getInstance():AppView
		{
			if(_instance == null)
			{
				_instance = new AppView();
			}
			return _instance;
		}
		
		override public function init(appStage:Stage, main:Sprite):void{
			super.init(appStage, main);
			this.playerLayer = new PSprite();
			this.tabLayer = new PSprite();
			uiLayer.addChild(this.playerLayer);
			uiLayer.addChild(this.tabLayer);
		}
	}
}